// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:25


// Source File Name:   s2.java

package com.zelix;

import java.awt.*;
import java.awt.event.*;
import java.io.IOException;
import java.net.URL;
import java.util.EventObject;
import java.util.Vector;
import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import javax.swing.text.JTextComponent;


//            g2, zo, as, so, 
//            g, to, zz, tx, 
//            u4, q4, j0, gs

public final class s2 extends g2
    implements ActionListener, ComponentListener, HyperlinkListener
{

    to d;
    private Vector e;
    private int f;
    JEditorPane g;
    JButton h;
    JButton i;
    JButton j;
    static String k[];
    private long l;
    private static final boolean m;
    private static String z[];

    public s2(to to1)
    {
        boolean flag = to.nc;
        super();
        e = new Vector();
        d = to1;
        i();
        u4 u4_1 = to1.b();
        setLocation(u4_1.a(), u4_1.b());
        tx tx1 = to1.c();
        setSize(tx1.b(), tx1.a());
        if(flag)
        {
            int i1 = gs.b;
            gs.b = ++i1;
        }
    }

    static void a(s2 s2_1, URL url)
    {
        s2_1.b(url);
    }

    static void a(s2 s2_1)
    {
        s2_1.f();
    }

    static void b(s2 s2_1)
    {
        s2_1.h();
    }

    public void actionPerformed(ActionEvent actionevent)
    {
label0:
        {
            boolean flag = to.nc;
            if(actionevent.getSource() == i)
            {
                setVisible(false);
                if(!flag)
                    break label0;
            }
            if(actionevent.getSource() == h)
            {
                f();
                if(!flag)
                    break label0;
            }
            if(actionevent.getSource() == j)
                h();
        }
    }

    private void f()
    {
        int i1 = e.size();
        if(f < i1)
        {
            URL url = (URL)e.get(i1 - 2 - f);
            try
            {
                g.setPage(url);
                f++;
                g();
            }
            catch(IOException ioexception)
            {
                a(url, ioexception);
            }
        }
    }

    private void a(URL url, Throwable throwable)
    {
        g.setText(throwable.toString() + z[0] + url);
    }

    private void g()
    {
label0:
        {
            boolean flag;
label1:
            {
                flag = to.nc;
                int i1 = e.size();
                if(i1 <= 1)
                {
                    h.setEnabled(false);
                    j.setEnabled(false);
                    if(!flag)
                        break label0;
                }
                if(f < i1 - 1)
                {
                    h.setEnabled(true);
                    if(!flag)
                        break label1;
                }
                h.setEnabled(false);
            }
            if(f > 0)
            {
                j.setEnabled(true);
                if(!flag)
                    break label0;
            }
            j.setEnabled(false);
        }
    }

    public void a()
    {
        super.a();
        d.a();
    }

    public void componentHidden(ComponentEvent componentevent)
    {
    }

    public void componentMoved(ComponentEvent componentevent)
    {
        as as1 = zo.r;
        Point point = getLocation();
        as1.a((int)point.getX(), (int)point.getY());
        as1.l();
    }

    public void componentResized(ComponentEvent componentevent)
    {
        as as1 = zo.r;
        Dimension dimension = getSize();
        as1.b(dimension.width, dimension.height);
        as1.l();
    }

    public void componentShown(ComponentEvent componentevent)
    {
    }

    protected void c()
    {
        zz.b(i);
    }

    private void h()
    {
        int i1 = e.size();
        if(f > 0)
        {
            URL url = (URL)e.get(i1 - f);
            try
            {
                g.setPage(url);
                f--;
                g();
            }
            catch(IOException ioexception)
            {
                a(url, ioexception);
            }
        }
    }

    public void hyperlinkUpdate(HyperlinkEvent hyperlinkevent)
    {
        URL url;
        boolean flag;
        flag = to.nc;
        if(hyperlinkevent.getEventType() != javax.swing.event.HyperlinkEvent.EventType.ACTIVATED)
            break MISSING_BLOCK_LABEL_128;
        url = null;
        int i1;
        url = hyperlinkevent.getURL();
        if(m)
        {
            long l1 = System.currentTimeMillis();
            long l2 = l1 - l;
            l = l1;
            if(l2 < 500L)
                return;
        }
        g.setPage(url);
        i1 = 0;
        if(!flag) goto _L2; else goto _L1
_L1:
        e.removeElementAt(e.size() - 1);
        i1++;
_L2:
        if(i1 < f) goto _L1; else goto _L3
_L3:
        f = 0;
        e.add(url);
        g();
        break MISSING_BLOCK_LABEL_128;
        Throwable throwable;
        throwable;
        a(url, throwable);
    }

    public void a(URL url)
    {
label0:
        {
            if(SwingUtilities.isEventDispatchThread())
            {
                b(url);
                if(!to.nc)
                    break label0;
            }
            so so1 = new so(this, url);
            SwingUtilities.invokeLater(so1);
        }
    }

    private void b(URL url)
    {
        try
        {
            g.setPage(url);
            e.clear();
            f = 0;
            e.add(url);
            g();
        }
        catch(IOException ioexception)
        {
            a(url, ioexception);
        }
        if(!isVisible())
            setVisible(true);
        if(getState() == 1)
            setState(0);
        toFront();
    }

    void i()
    {
        setTitle(z[2]);
        Container container = getContentPane();
        j0 j0_1 = new j0(container);
        container.setLayout(j0_1);
        g = new JEditorPane();
        g.setEditable(false);
        container.add(new q4(g), z[3]);
        i = new JButton(z[1]);
        i.setToolTipText(to.b(to.mc));
        container.add(i, z[5]);
        h = new JButton("<");
        h.setToolTipText(to.b(to.kc));
        container.add(h, z[6]);
        j = new JButton(">");
        j.setToolTipText(to.b(to.lc));
        container.add(j, z[4]);
        j0_1.a(k);
        h.addActionListener(this);
        i.addActionListener(this);
        j.addActionListener(this);
        g g1 = new g(this);
        h.addKeyListener(g1);
        i.addKeyListener(g1);
        j.addKeyListener(g1);
        addComponentListener(this);
        g.addHyperlinkListener(this);
        g();
        try
        {
            setIconImage(zo.a(this));
        }
        catch(Throwable throwable) { }
    }

    private static char[] z(String str) {
        char ac[] = str.toCharArray();
        int clen = ac.length;
        if (clen >= 2)
            return ac;
        ac[0] ^= 0x4e;
        return ac;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x71;
                    break;
                case 1:
                    key = 70;
                    break;
                case 2:
                    key = 60;
                    break;
                case 3:
                    key = 51;
                    break;
                default:
                    key = 78;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        String as1[] = new String[7];
        as1[0] = z(z("Q|\034"));
        as1[1] = z(z("2*S@+"));
        as1[2] = z(z("+#PZ6Q\rPR=\002\013]@:\0244\034\036n9#PC"));
        as1[3] = z(z("\0345[r<\024'"));
        as1[4] = z(z("\027)ND/\003\"~G "));
        as1[5] = z(z("\022*S@+32R"));
        as1[6] = z(z("\023'_X\f\005("));
        z = as1;
        String as2[] = new String[18];
        as2[0] = z(z("\0345[r<\024'\022G!\001{\t"));
        as2[1] = z(z("\0345[r<\024'\022_+\0272\001\006"));
        as2[2] = z(z("\0345[r<\024'\022A'\026.H\016-\036(HR'\037#N\035<\030!TGcD"));
        as2[3] = z(z("\0345[r<\024'\022Q!\0052S^s\022)RG/\030(YA`\023)HG!\034k__!\002#~G _\"YU/\004*H{+\030!TGc@v"));
        as2[4] = z(z("\0232Rd'\0252T\016#\020>\024Q/\022-~G _\"YU/\004*Hd'\0252T\037-\035)OV\f\005(\022W+\027'I_:&/XG&] SA9\0204Xq:\037hXV(\0203PG\031\030\"H[g"));
        as2[5] = z(z("\0232R{+\030!TGs\034'D\033,\020%Wq:\037hXV(\0203PG\006\024/[[:]%P\\=\024\004H]`\025#ZR;\0352tV'\026.H\037(\0364KR<\025\004H]`\025#ZR;\0352tV'\026.H\032"));
        as2[6] = z(z("\023'_X\f\005(\022Q!\0052S^s\022)RG/\030(YA`\023)HG!\034k\t"));
        as2[7] = z(z("\023'_X\f\005(\022A'\026.H\016-\035)OV\f\005(\022_+\0272\021\006"));
        as2[8] = z(z("\023'_X\f\005(\022D'\0252T\016,\005(kZ*\005."));
        as2[9] = z(z("\023'_X\f\005(\022[+\030!TGs\0232R{+\030!TG"));
        as2[10] = z(z("\022*S@+32R\035,\0362H\\#L%S]:\020/RV<_$SG:\036+\021\006"));
        as2[11] = z(z("\022*S@+32R\035-\024(HV<){_\\ \005'U]+\003hKZ*\005.\026\006~^w\f\003"));
        as2[12] = z(z("\022*S@+32R\0359\030\"H[s\0232Rd'\0252T"));
        as2[13] = z(z("\022*S@+32R\035&\024/[[:L$H]\006\024/[[:"));
        as2[14] = z(z("\027)ND/\003\"~G _$SG:\036+\001P!\0372]Z \0244\022Q!\0052S^cD"));
        as2[15] = z(z("\027)ND/\003\"~G _*YU:L%P\\=\024\004H]`\003/[[:Zs"));
        as2[16] = z(z("\027)ND/\003\"~G _1UW:\031{^G &/XG&"));
        as2[17] = z(z("\027)ND/\003\"~G _.YZ)\0312\001Q:\037\016YZ)\0312"));
        k = as2;
        if(zo.j.indexOf(z(z("8\004q"))) <= -1)
            m = false;
        else
            m = true;
    }
}